import request from '@/utils/request'

// 查询增材方式列列表
export function listWay(query) {
    return request({
        url: '/technology/materialAddMethod/list',
        method: 'get',
        params: query
    })
}

// 查询增材方式列详细
export function getWay(technologyMaterialAddMethodId) {
    return request({
        url: '/technology/materialAddMethod/' + technologyMaterialAddMethodId,
        method: 'get'
    })
}

// 新增增材方式列
export function addWay(data) {
    return request({
        url: '/technology/materialAddMethod',
        method: 'post',
        data: data
    })
}

// 修改增材方式列
export function updateWay(data) {
    return request({
        url: '/technology/materialAddMethod',
        method: 'put',
        data: data
    })
}

// 删除增材方式列
export function delWay(technologyMaterialAddMethodId) {
    return request({
        url: '/technology/materialAddMethod/' + technologyMaterialAddMethodId,
        method: 'delete'
    })
}
export function changeWayStatus(technologyMaterialAddMethodId,status){
    const data = {
        technologyMaterialAddMethodId,
        status
      }
      return request({
        url: '/technology/materialAddMethod/changeStatus',
        method: 'put',
        data: data
      })
}
// 增材方式下拉数据
export function getTechnologyMaterialAddMethodOptions(){
    return request({
        url: '/technology/materialAddMethod/dropList',
        method: 'get'
    })
}